<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="../js/jquery-1.11.0.min.js"></script>
  <script>
    $(function (){

      $("#home").click(function (){
        $("#home").attr("class","header-nav__cur")
        location.href="index.html"
      })
      $("#favorite").click(function (){
        $("#favorite").attr("class","header-nav__cur")
        location.href="mycollectionandmusiclist.html"
      })
      $.get("/music/user/getusername",
              function (data) {
                var lis='';
                if (data.username != null) {
                  lis+='<a style="width: 150px;height: 20px">欢迎'+data.username+'</a>'+
                          '<a href="javascript:location.href = \'/music/userhtml/userupdate.html\';">修改信息</a>'+
                          '<a href="javascript:location.href = \'/music/user/loginOut\';">退出登录</a>'
                  +'<a href="vip.html" class="login">VIP</a>';
                  $("#headuserinf").html(lis);
                }else {

                }
              },
              "json");
    })
  </script>
</head>

<body>
<div class="header-top">
  <a href="#" class="logo"></a>
  <nav class="header-nav">
    <ul>
      <li id="home"><a href="index.html" class="header-nav__cur">音乐馆</a></li>
      <li id="favorite"><a href="mycollectionandmusiclist.html">我的音乐</a></li>
      <li >
        <div class="btn-group ">
          <a type="button" class="btn btn-primary dropdown-toggle"
             data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            排行榜 <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <li><a href="rankByComments.html">评论排行榜</a></li>
            <li><a href="rankByFavors.html">收藏排行榜</a></li>
          </ul>
        </div>
      </li>
      <li id><a href="sort.html">分类</a></li>
      <li id><a href="search.html">搜索</a></li>
    </ul>
  </nav>
<!--  <div class="header-search">-->
<!--    <form id="findAllForm" method="get">-->
<!--      <input name="name" type="text" id="name" class="text" placeholder="here...">-->
<!--      <div class="btn"><i class="icon-sprite"></i></div>-->
<!--    </form>-->

<!--  </div>-->
  <div class="header-login" id="headuserinf">
    <a href="userlogin.html" class="login">Login</a>
    <a href="#" class="login">Exit</a>
    <a href="vip.html" class="login">VIP</a>
  </div>
</div>
</body>
</html>